<template>
    <div>
        <h1>我是一个子组件</h1>
        <input type="text" v-model="msg">
        <button @click="summit">发送</button> 
    </div>
</template>
<script>
export default {
    props: ['msg'],
    data() {
        return {

        };
    },
    methods:{
        summit(){
            this.$emit('thanks','谢谢爸爸，我收到了￥'+this.msg+"元");
        }
    }
}
</script>